class Solution {
public:
    string replaceSpace(string s) {
        string str;
        for(int i=0;i<s.size();i++){
            if(s[i]==' '){
                str.push_back('%');
                str.push_back('2');
                str.push_back('0');
            }else{
                str.push_back(s[i]);
            }
        }
        return str;
    }
};